﻿//------------------------------------------------------------------------------
// <copyright file="RpcMessage.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

namespace Microsoft.Internal.GamesTest.Rpc.Client
{
    using System.Runtime.Serialization;

    /// <summary>
    /// A message object used to encapsulate a request or response from an RpcServer.
    /// </summary>
    [DataContract]
    internal class RpcMessage
    {
        /// <summary>
        /// Gets or sets the type of the message; request or response.
        /// </summary>
        [DataMember(Name = "messageType")]
        public RpcMessageType MessageType { get; set; }

        /// <summary>
        /// Gets or sets the serialized object that is the payload of this message.
        /// </summary>
        [DataMember(Name = "payload")]
        public string Payload { get; set; }
    }
}
